﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Romeo.Data
{
    public class EvaluationStatistics
    {
        public long EvaluatedMoves;
        public long EvaluatedMidPositions;
        public long EvaluatedEndPositions;
        public long AlphaBetaPrunes;

        public EvaluationStatistics ()
        {
        }

        public void ResetStatistics ()
        {
            EvaluatedMoves = 0;
            EvaluatedMidPositions = 0;
            EvaluatedEndPositions = 0;
            AlphaBetaPrunes = 0;
        }

        public void AddStatistics (EvaluationStatistics aOther)
        {
            EvaluatedMoves += aOther.EvaluatedMoves;
            EvaluatedMidPositions += aOther.EvaluatedMidPositions;
            EvaluatedEndPositions +=aOther.EvaluatedEndPositions;
            AlphaBetaPrunes += aOther.AlphaBetaPrunes;
        }

        public string StatisticsAsString ()
        {
            return String.Format ("Moves: {0}, Mid: {1}, End:{2}, A/B:{3}", EvaluatedMoves, EvaluatedMidPositions, EvaluatedEndPositions, AlphaBetaPrunes);
        }
    }
}
